package edu.cicese.alz.reports;

import java.awt.Graphics;
import java.awt.Graphics2D;

/**
 * Created by: Eduardo Quintana Contreras
 * Date: 3/08/12
 * Time: 12:24 PM
 */
public class BlockAccelerometerPreview extends BlockPreview {

	public BlockAccelerometerPreview() {
		loadAccelerometerValues();
	}

	@Override
	public void paintComponent(Graphics g) {
		if (accValues != null) {
			Graphics2D g2 = (Graphics2D) g;

			for (int y = 0; y < height / 30; y++) {
				for (int x = 0; x < width; x++) {
					g2.setColor(accColors[accValues[y][x]]);
					g2.drawLine(x, y * 30, x, y * 30 + 30);
				}
			}
		}
	}
}
